#!/usr/bin/env python

PACKAGE = 'fanguangbantrilateration'
from dynamic_reconfigure.parameter_generator_catkin import ParameterGenerator, str_t, double_t, bool_t, int_t
gen = ParameterGenerator()
gen.add("end_scan_index", int_t, 0, "end_scan_index",9999999,0,99999999)

gen.add("test_num", int_t, 0, "test_num",-1,-10,50)

gen.add("time_log_fig", int_t, 0, "time_log_fig",-1,-10,500)

gen.add("epsilon", double_t, 0, "epsilon", 0.11,0.0,10)
gen.add("time_milliseconds", int_t, 0, "time_milliseconds", 100,0,10000)
gen.add("scan_distances_threshole", double_t, 0, "scan_distances_threshole", 10.0,0.0,100.0)


gen.add("mapTbase_link_pos_threshold", double_t, 0, "scan_distances_threshole", 0.5,0.0,10.0)
gen.add("mapTbase_link_rot_threshold", double_t, 0, "scan_distances_threshole", 0.7,0.0,10.0)

gen.add("reflectorPanelPoints_vector_size", int_t, 0, "reflectorPanelPoints_vector_size", 8,0,10000)
gen.add("isFindReflectorPanelPoints_vector_first", bool_t, 0, "isFindReflectorPanelPoints_vector_first", True)
gen.add("isFindReflectorPanelPoints_vector", bool_t, 0, "isFindReflectorPanelPoints_vector", True)
gen.add("isFindRlectorPanelPointAllUnordered_maps", bool_t, 0, "isFindRlectorPanelPointAllUnordered_maps", True)

gen.add("isUsingThirdPartyLocalization", bool_t, 0, "isFindReflectorPanelPoints_vector", True)

gen.add("fangaungbanHeight", double_t, 0, "fangaungbanHeight",0.001,0.0,10)
gen.add("fangaungbanWidth", double_t, 0, "fangaungbanWidth", 0.10,0.0,10)
gen.add("fangaungbanLength", double_t, 0, "fangaungbanLength", 0.50,0.0,10)

gen.add("fangaungzhuRadius", double_t, 0, "fangaungzhuRadius", 0.045,0.0,10)
gen.add("fangaungzhuHeight", double_t, 0, "fangaungzhuHeight", 0.09,0.0,10)
gen.add("fangaungzhuWidth", double_t, 0, "fangaungzhuWidth", 0.09,0.0,10)
gen.add("fangaungzhuLength", double_t, 0, "fangaungzhuLength", 0.5,0.0,10)

gen.add("curvature_threshold", double_t, 0, "curvature_threshold", 0.001,0.0,100)
gen.add("curvature_range_min_threshold", double_t, 0, "curvature_range_min_threshold", 1.5,0.0,100)
gen.add("curvature_range_max_threshold", double_t, 0, "curvature_range_max_threshold", 2.6,0.0,100)
gen.add("a", double_t, 0, "a", 1.0,0.0,1.0)
gen.add("r", double_t, 0, "r", 0.0,0.0,1.0)
gen.add("g", double_t, 0, "g", 1.0,0.0,1.0)
gen.add("b", double_t, 0, "b", 0.0,0.0,1.0)


gen.add("scan_intensitie", double_t, 0, "scan_intensitie", 27154,0,1000000)
gen.add("intensitie_threshole", double_t, 0, "intensitie_threshole", 100.0,0,1000000)
gen.add("range_threshole", double_t, 0, "range_threshole", 0.1,0,1000)

gen.add("matchok_timeout", double_t, 0, "matchok_timeout", 5.0,0,100)
gen.add("edgesthreshold", double_t, 0, "edgesthreshold", 0.1,0,10)
gen.add("anglesthreshold", double_t, 0, "anglesthreshold", 0.157,0,6.28)
gen.add("calculateEdge_threshold", double_t, 0, "calculateEdge_threshold", 5,0,1000)

gen.add("variance_yaw_threshold", double_t, 0, "variance_yaw_threshold", 0.006,0,10)
gen.add("variance_adjustment_yaw_threshold", double_t, 0, "variance_adjustment_yaw_threshold", 0.018,0,10)

gen.add("variance_pose_threshold", double_t, 0, "variance_pose_threshold", 0.06,0,10)
gen.add("variance_adjustment_pose_threshold", double_t, 0, "variance_adjustment_pose_threshold", 0.3,0,10)

gen.add("variance_min_pose_lerance", double_t, 0, "variance_min_pose_lerance", 0.03,0,10)
gen.add("variance_min_yaw_lerance", double_t, 0, "variance_min_yaw_lerance", 0.03,0,10)


gen.add("score_min_threshold", double_t, 0, "variance_min_pose_lerance", 1.2,0,50)
gen.add("score_max_threshold", double_t, 0, "variance_min_yaw_lerance", 3.0,0,50)




gen.add("isNotMin_varianceNum_target", int_t, 0, "isNotMin_varianceNum_target", 3,0,100)

gen.add("targetTrilaterationTimeOut", double_t, 0, "targetTrilaterationTimeOut", 10.0,0,1000)


gen.add("matchcostmapwithscanTimeOut", double_t, 0, "matchcostmapwithscanTimeOut", 3.0,0,50)

gen.add("filter_tow_ont_distance_threshold", double_t, 0, "filter_tow_ont_distance_threshold", 0.3,0,100)



gen.add("window_size", int_t, 0, "window_size",5,1,10000)
gen.add("alpha", double_t, 0, "alpha", 0.1,0.1,10000)





gen.add("isCircular_threshold", double_t, 0, "isCircular_threshold", 0.01,0,10)
gen.add("isLine_threshold", double_t, 0, "isLine_threshold", 0.01,0,10)
gen.add("points_size_threshold", int_t, 0, "points_size_threshold",2,0,50)

gen.add("findPolygonIndices_threshold", int_t, 0, "findPolygonIndices_threshold",2,0,50)

gen.add("isSendTf", bool_t, 0, "isSendTf", True)

gen.add("is_trilateration", bool_t, 0, "is_trilateration", True)
gen.add("firstTrilateration_with_yawFig", bool_t, 0, "firstTrilateration_with_yawFig", False)
gen.add("isSend_publish_circle_pointCloud", bool_t, 0, "isSend_publish_circle_pointCloud", True)
gen.add("isFirtFanguangbanShowAllMaker", bool_t, 0, "isFirtFanguangbanShowAllMaker", True)
gen.add("isStartAreAnglesEqualNew", bool_t, 0, "isStartAreAnglesEqualNew", True)
gen.add("isShowFanGuanBanPoint", bool_t, 0, "isShowFanGuanBanPoint", True)
gen.add("isShowFanGuanBanmarkerPath", bool_t, 0, "isShowFanGuanBanmarkerPath", True)
gen.add("isShowMatchokReflectorFanGuanBanPoint", bool_t, 0, "isShowMatchokReflectorFanGuanBanPoint", True)
gen.add("isReadMatchokReflectorPanel", bool_t, 0, "isReadMatchokReflectorPanel", True)
gen.add("is_start_place_rotation", bool_t, 0, "is_start_place_rotation", False)
gen.add("rotate_in_place_variance_multiplier", int_t, 0, "rotate_in_place_variance_multiplier",1,0,50)


gen.add("isPublish_matchcostmapwithscan_mssage", bool_t, 0, "isPublish_matchcostmapwithscan_mssage", True)
gen.add("free_cell", int_t, 0, "free_cell",0,0,255)
gen.add("occupied_cell", int_t, 0, "occupied_cell",100,0,255)
gen.add("unknown_cell", int_t, 0, "unknown_cell",-1,-255,255)
gen.add("matchingcostma_radius", double_t, 0, "matchingcostma_radius", 0.1,0,1)
gen.add("matchingcostma_threshold", double_t, 0, "matchingcostma_threshold", 0.8,0,1)
gen.add("is_use_scan_points_map_size", bool_t, 0, "is_use_scan_points_map_size", False)

frame_id_enum = gen.enum([gen.const("laser",      str_t, "laser", "laser"),
                          gen.const("laser_scan",      str_t, "laser_scan", "laser_scan"),
                          gen.const("map",      str_t, "map", "map"),
                          gen.const("base_footprint",      str_t, "base_footprint", "base_footprint"),
                          gen.const("base_link",      str_t, "base_link", "base_link"),
                          gen.const("imu_link",     str_t, "imu_link", "imu_link"),
                          gen.const("odom",     str_t, "odom", "odom")
                          ],
                         "An frame to set frame")

gen.add("map_frame_id", str_t, 0, "Which frame to use for map.", "map", edit_method=frame_id_enum)
gen.add("base_frame_id", str_t, 0, "Which frame to use for the robot base.", "base_link", edit_method=frame_id_enum)
gen.add("odom_frame_id", str_t, 0, "Which frame to use for the robot base.", "odom", edit_method=frame_id_enum)
gen.add("laser_frame_id", str_t, 0, "Which frame to use for map.", "laser", edit_method=frame_id_enum)
gen.add("imu_frame_id", str_t, 0, "Which frame to use for map.", "imu_link", edit_method=frame_id_enum)

gen.add("isslectPoint", bool_t, 0, "isslectPoint", False)
gen.add("update_point_id", str_t, 0, "update_point_id", "EMPTY")
gen.add("update_factor", double_t, 0, "update_factor", 0.01,0.0,100.0)
gen.add("update_up_x_button", bool_t, 0, "update_up_x_button", False)
gen.add("update_down_x_button", bool_t, 0, "update_down_x_button", False)
gen.add("update_up_y_button", bool_t, 0, "update_up_y_button", False)
gen.add("update_down_y_button", bool_t, 0, "update_down_y_button", False)

gen.add("update_point_x", double_t, 0, "update_point_x", 0.0,-200.0,200.0)
gen.add("update_point_y", double_t, 0, "update_point_y", 0.0,-200.0,200.0)
gen.add("isupdate_point", bool_t, 0, "isupdate_point", False)

gen.add("restore_defaults", bool_t, 0, "restore_defaults", False)
exit(gen.generate(PACKAGE, "fanguangbantrilateration", "TrilaterationParam"))
